#! /bin/bash
set -e

NOW_DIR=$(cd -P $(dirname "$0");pwd)

chmod -R 777 ${NOW_DIR}/log
chmod -R 777 ${NOW_DIR}/data
chmod -R 777 ${NOW_DIR}/conf

docker run -it -d \
	--name iredis6.2.6 \
  -p 6379:6379 \
  -v ${PWD}/conf:/usr/local/etc/redis \
  -v ${PWD}/log:/var/log \
  -v ${PWD}/data:/data \
  --restart=always --privileged=true iredis:6.2.6 \
  redis-server /usr/local/etc/redis/redis.conf


#docker run -it -d \
#	--name iredis6.2.6 \
#  -p 6379:6379 \
#  --restart=always --privileged=true iredis:6.2.6
